package cq.com.cn.service;

import cq.com.cn.dao.BooksDao;
import cq.com.cn.model.BooksModel;

import java.util.List;

public class BooksService {

    public List<BooksModel> queryBooksByType(int type){
        BooksDao booksDao=new BooksDao();
        return booksDao.findBookByType(type);
    }

    public List<BooksModel> queryBooksByName(String bookName) {
        BooksDao booksDao=new BooksDao();
        return booksDao.findBookByName(bookName);
    }

    public BooksModel queryBooksById(String id) {
        BooksDao booksDao=new BooksDao();
        return booksDao.findBookById(id);
    }
}
